#!/usr/bin/env ruby
#
#  Created by Dzema Dmitri on 2006-11-12.
#  Copyright (c) 2006. All rights reserved.

class Error
  attr_reader :message
  
  def initialize(message,line,pos)
    @message = message
    @line = line
    @pos = pos
  end
  
  def to_s
    "#{@message} at <#{@line},#{@pos}>"
  end
end

class LexError < Error    
end


class CompilerException < Exception
  attr_reader :line, :pos
  
  def initialize(line, pos)
    @line = line
    @pos = pos
  end
end